<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
       <div v-if="find">这是显示的div</div>
      <button @click="dianji">点击10次显示</button>
    </div>
</body>
<script src="Vue.js"></script>
<script>
    //1. 对一个按钮点击十次后，让某个div显示出来
    const {createApp , ref} = Vue
    createApp({
        setup(){
       let btn = ref(0)
       let find = ref(false)
       let dianji = function dianji(){
        btn.value++
        if(btn.value === 10){
          find.value = true
        }
       }
        return{
           btn,
           find,
          dianji
        }
        }
    }).mount('#app');
</script>
</html>